package com.heima.user.controller.v1;

import com.heima.model.common.dtos.LoginDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.user.service.AppUserService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
//用户控控制接口
@RequestMapping("/api/v1/login")
@Api(value = "用户登录",tags = "app_user",description = "app用户端登录")
public class UserController {
	@Autowired
	private AppUserService appUserService;
	
	@PostMapping("/login_auth")
	public ResponseResult login(@RequestBody LoginDto loginDto) {
		
		return appUserService.login(loginDto);
	}

}
